package org.meichao.demo.service.csvJob;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 如果service比较多，可以使用工厂模式
 */
@Component
public class CsvJobServiceFactory {

    @Autowired
    private CsvDemoService csvDemoService;

    public CsvJobService getInstance(String name){
        if("demo".equals(name))
            return csvDemoService;
        return null;
    }
}
